/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.pe.siass.dao;

import com.pe.siass.beans.RepresentanteBean;
import java.util.List;
import org.apache.ibatis.session.SqlSession;

/**
 *
 * @author Hrengifo
 */
public class RepresentanteDao {

    public RepresentanteBean insertRepresentante(RepresentanteBean representanteBean, SqlSession sqlSession) throws Exception{
         sqlSession.insert("insertRepresentante", representanteBean);
         return representanteBean;
    }

    public int updateRepresentante(RepresentanteBean representanteBean, SqlSession sqlSession) throws Exception{
         int aux = sqlSession.update("updateRepresentante", representanteBean);
         return aux;
    }

    public List<RepresentanteBean> selectRepresentante(RepresentanteBean representanteBean, SqlSession sqlSession) throws Exception{
         List<RepresentanteBean> lstRepresentanteBean = sqlSession.selectList("selectRepresentante", representanteBean);
        return lstRepresentanteBean;
    }

}
